package com.cyt.work.association.service;

import com.cyt.base.model.dto.ReturnResult;
import com.cyt.sys.service.BaseService;
import com.cyt.work.association.model.po.WxAssociationSign;
import com.cyt.work.association.model.vo.WxAssociationSignVo;
import com.cyt.wx.model.po.WxEducationUser;
import com.cyt.wx.model.po.WxMember;

import java.util.List;

/**
 * 社团招新管理-社团报名Service层接口类
 *
 * @author ding xu
 * @date 2019-9-17
 */
public interface WxAssociationSignService extends BaseService<WxAssociationSign> {

    /**
     * 社团报名
     *
     * @param wxAssociationSignVo 参数接受对象
     * @param wxMember      当前用户
     * @return ReturnResult
     * @author ding xu
     * @date 2019-9-17
     */
    ReturnResult addOrUpdate(WxAssociationSignVo wxAssociationSignVo, WxMember wxMember,WxEducationUser wxEducationUser);

    /**
     * 社团退团
     *
     * @param wxAssociationSignVo 参数接受对象
     * @param wxMember      当前用户
     * @return ReturnResult
     * @author ding xu
     * @date 2019-9-17
     */
    ReturnResult quitAssociation(WxAssociationSignVo wxAssociationSignVo, WxMember wxMember,WxEducationUser wxEducationUser);

    /**
     * 根据社团id、招新id查询当前用户报名状态
     *
     * @param wxAssociationSignVo 参数接受对象
     * @return ReturnResult
     * @author ding xu
     * @date 2019-9-17
     */
    List<WxAssociationSign> getByAssIdAndAssNewId(WxAssociationSignVo wxAssociationSignVo);

    /**
     * 学生报名社团
     * @param userId 用户登录ID，wxEducationUser表中主键
     * @param associationId 社团主键
     * @param associationNewId 社团招新主键
     * @param associationNewDetailId 社团招新中的社团主键
     * @author congcong tao
     * @date 2019/11/20 8:54
     */
    ReturnResult associationNewSign(String userId, String applyId, String associationId, String associationNewId, String associationNewDetailId);

    ReturnResult associationNewSignT(String userId, String applyId, String associationId, String associationNewId, String associationNewDetailId);

    ReturnResult associationNewSignR(String userId, String applyId, String associationId, String associationNewId, String associationNewDetailId);

    /**
     * 学生退出社团
     * @param userId 用户登录ID，wxEducationUser表中主键
     * @param associationNewId 社团招新主键
     * @param associationNewDetailId 社团招新中的社团主键
     * @param signId 报名主键
     * @author congcong tao
     * @date 2019/11/20 9:49
     */
    ReturnResult associationNewQuit(String userId, String associationNewId, String associationNewDetailId, String signId);

    /**
     * 查询社团已报名人
     * @param associationDetailId  社团招新中的社团主键
     * @param pageSize
     * @param pageNum
     * @author congcong tao
     * @date 2019/11/22 8:28
     */
    ReturnResult findVoHasSignPage(String associationDetailId, int pageSize, int pageNum);

    /**
     * 查询学生报名社团
     * @param userId 学生主键
     * @param pageSize
     * @param pageNum
     * @author congcong tao
     * @date 2019/11/22 9:10
     */
    ReturnResult findDetailVoByUserPage(String userId, int pageSize, int pageNum);
}